// solver.h: Header file for Solver abstract class
// Written by Victor Luna Freire - victorclf@live.com
// Copyright (c) Victor Luna Freire. All rights reserved.
// Saturday, October 31, 2009 5:07:17 PM

#ifndef SOLVER_H_93172317238917283718
#define SOLVER_H_93172317238917283718

#include "maze.h"

#include <vector>


// Abstract class for a Maze Solver.
class Solver : public Maze {
	// Start solving. Must be private: The processed maze might be altered and it would be impossible to start solving again.
	//virtual void start_process(const Vec2i& startpos, const Vec2i& exitpos) = 0;
	
public:
	// Constructs a maze solver.
	Solver(const std::vector<std::string>& maze_to_solve) 
		: Maze(maze_to_solve)
		  {  };
	
	// Perform next step in the solution. Returns false if the maze is solved. Starts solving if it was not started before.
	virtual bool next_step() = 0;
	
	// Returns the solution found. The returned vector will be empty if no solution has been found yet.
	virtual std::vector<Vec2i> get_solution() = 0;

	// Is the maze solved?
	virtual bool is_done() const = 0;
};



#endif // SOLVER_H_93172317238917283718
